package cn.izeno.wx.models.mp

import cn.izeno.wx.models.web.BaseRes
import cn.izeno.wx.models.web.Member
import com.alibaba.fastjson.JSONArray
import com.alibaba.fastjson.JSONObject
import com.alibaba.fastjson.annotation.JSONField

class InitRes {
  @JSONField(name = "BaseResponse")
  lateinit var base: BaseRes

  @JSONField(name = "Count")
  var count = 0

  /**
   * 当前聊天列表
   */
  @JSONField(name = "ContactList")
  var contactList = emptyList<Member>()

  /**
   * 暂时不知道有什么用
   */
  @JSONField(name = "SyncKey")
  lateinit var syncKey: SyncKeyRes

  /**
   * 自己的账号
   */
  @JSONField(name = "User")
  lateinit var user: Member

  /**
   * 当前聊天列表集合, 用好隔开的 [Member.username]
   */
  @JSONField(name = "ChatSet")
  var chatSet = ""

  /**
   * 关键接口凭证
   */
  @JSONField(name = "SKey")
  lateinit var skey: String

  /**
   * 客户端版本， 没有用处
   */
  @JSONField(name = "ClientVersion")
  lateinit var clientVersion: String

  /**
   * 系统时间，10位时间戳
   */
  @JSONField(name = "SystemTime")
  var systemTime: Long = 0

  @JSONField(name = "GrayScale")
  var grayScale: Int = 1


  @JSONField(name = "InviteStartCount")
  var inviteStartCount: Int = 0

  /**
   * 有推文的公众号数量
   */
  @JSONField(name = "MPSubscribeMsgCount")
  var mpSubscribeMsgCount: Int = 0

  /**
   * 公众号推文，没用的数据
   */
  @JSONField(name = "MPSubscribeMsgList")
  lateinit var mpSubscribeMsgList: JSONArray

  /**
   * 点击上报周期，预测单位是 ms， 也就是周期为 10 minutes
   */
  @JSONField(name = "ClickReportInterval")
  var clickReportInterval: Int = 600000
}
